/* 
	PROJECT: scsu-csc653-chatter
	ABOUT: implements chatter server input listener by passing the input data to javascript for processing and display
	DATE: 09-2010
	AUTHORS: skenny214@gmail.com, jinhongli08@gmail.com, hourigan.brian@gmail.com, yaqiluo2010@gmail.com
*/

package chatter.client;

import netscape.javascript.JSObject;

public class JavascriptChatterClientInputListener implements IChatterClientInputListener {

	public void onClientInput(ClientInputEvent event) {
		//get the window object for the applet that is running
		JSObject window = JSObject.getWindow(ChatterClientApplet.currentApplet);
		
		//call javascript function with the data we are receiving from the server
		window.eval("onChatterClientInput('"+event.input+"')");
	
	}

}
